From bee0f4d2876a62204785a3638874e224293a3c90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Tue, 6 Nov 2018 14:18:20 +0100 Subject: [PATCH] babl: permit registering model conversions for non-rgb models --- babl/babl-conversion.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c index 1127c00..180ddad 100644 --- a/babl/babl-conversion.c +++ b/babl/babl-conversion.c @@ -228,20 +228,13 @@ _conversion_new (const char *name, const Babl *src_format = NULL; const Babl *dst_format = NULL; - if (model_is_rgba (BABL (babl->conversion.source)) || - model_is_rgba (BABL (babl->conversion.destination))) - { - src_format = babl_format_with_model_as_type ( - BABL (babl->conversion.source), - babl_type_from_id (BABL_DOUBLE)); - dst_format = babl_format_with_model_as_type ( - BABL (babl->conversion.destination), - babl_type_from_id (BABL_DOUBLE)); - } - else - { - babl_fatal ("neither source nor destination model is RGBA (requirement might be temporary)"); - } + src_format = babl_format_with_model_as_type ( + BABL (babl->conversion.source), + babl_type_from_id (BABL_DOUBLE)); + dst_format = babl_format_with_model_as_type ( + BABL (babl->conversion.destination), + babl_type_from_id (BABL_DOUBLE)); + babl_conversion_new ( src_format, dst_format, -- 2.30.2